org.eclipse.vtp.framework.common
Interface IDataObject

All Known Subinterfaces:
IArrayObject, IBooleanObject, IDateObject, IDecimalObject, INumberObject, IStringObject

public interface IDataObject

Represents a dynamic piece of data at runtime.

Author:
Lonnie Pryor

Method Summary
 IDataObject getField(java.lang.String fieldName)
          Returns the value of the specified field.
 IDataType getType()
          Returns the type of this data object.
 boolean isEqualTo(java.lang.Object object)
          Returns true if the specified value is equal to this object's value.
 boolean isGreaterThan(java.lang.Object object)
          Returns true if the specified value is greater than this object's value.
 boolean isGreaterThanOrEqualTo(java.lang.Object object)
          Returns true if the specified value is greater than or equal to this object's value.
 boolean isLessThan(java.lang.Object object)
          Returns true if the specified value is less than this object's value.
 boolean isLessThanOrEqualTo(java.lang.Object object)
          Returns true if the specified value is less than or equal to this object's value.
 boolean isReadOnly()
          Returns true if this data object is immutable.
 boolean setField(java.lang.String fieldName, IDataObject variable)
          Sets the value of the specified field.
 java.lang.String toString()
          Returns a string representation of this data object.
 

Method Detail

getType

IDataType getType()
Returns the type of this data object.

Returns:
The type of this data object.

isReadOnly

boolean isReadOnly()
Returns true if this data object is immutable.

Returns:
True if this data object is immutable.

getField

IDataObject getField(java.lang.String fieldName)
Returns the value of the specified field.

Parameters:
fieldName - The name of the field to return the value of.
Returns:
The value of the specified field or null if this object does not have a field with the specified name.

setField

boolean setField(java.lang.String fieldName,
                 IDataObject variable)
Sets the value of the specified field.

Parameters:
fieldName - The name of the field to set the value of.
variable - The value to set the field to.
Returns:
True if the specified field exists and its value was changed.

isEqualTo

boolean isEqualTo(java.lang.Object object)
Returns true if the specified value is equal to this object's value.

This method will attempt to coerce the supplied value into a type compatible with the type of this data object.

Parameters:
object - The value to test against.
Returns:
True if the specified value is equal to this object's value.

isLessThan

boolean isLessThan(java.lang.Object object)
Returns true if the specified value is less than this object's value.

This method will attempt to coerce the supplied value into a type compatible with the type of this data object.

Parameters:
object - The value to test against.
Returns:
True if the specified value is less than this object's value.

isLessThanOrEqualTo

boolean isLessThanOrEqualTo(java.lang.Object object)
Returns true if the specified value is less than or equal to this object's value.

This method will attempt to coerce the supplied value into a type compatible with the type of this data object.

Parameters:
object - The value to test against.
Returns:
True if the specified value is less than or equal to this object's value.

isGreaterThan

boolean isGreaterThan(java.lang.Object object)
Returns true if the specified value is greater than this object's value.

This method will attempt to coerce the supplied value into a type compatible with the type of this data object.

Parameters:
object - The value to test against.
Returns:
True if the specified value is greater than this object's value.

isGreaterThanOrEqualTo

boolean isGreaterThanOrEqualTo(java.lang.Object object)
Returns true if the specified value is greater than or equal to this object's value.

This method will attempt to coerce the supplied value into a type compatible with the type of this data object.

Parameters:
object - The value to test against.
Returns:
True if the specified value is greater than or equal to this object's value.

toString

java.lang.String toString()
Returns a string representation of this data object.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this data object.